<!-- qa_pair_list.html -->
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>问答列表</title>
    <link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
    <header>
        <h1>景点问答列表</h1>
    </header>
    <div class="qa-pair-list">
        <ul>
            {% for qa_pair in qa_pairs %}
                <li>
                    <p><strong>问题:</strong> {{ qa_pair.question }}</p>
                    <p><strong>答案:</strong> {{ qa_pair.answer }}</p>
                    <a href="{% url 'qa_pair_update' qa_pair.id %}">编辑</a>
                </li>
            {% empty %}
                <li>暂无问答。</li>
            {% endfor %}
        </ul>
        <a href="{% url 'qa_pair_create' scenic_spot_id %}">新增问答</a>
    </div>
</body>
</html>
